package com.test;

/**
 * 函数式编程
 *   1. 接口中只能有一个抽象方法，且接口加了@FunctionalInterface
 */


class MyRun implements  Runnable{
    @Override
    public void run() {
        System.out.println("....");
    }
}

public class ThreadDemo {
    public static void main(String[] args) {
       /* Runnable  runnable = new Runnable() {
            @Override
            public void run() {

            }
        };*/

        Runnable runnable = ()->{ System.out.println("Hello");};




    }
}

